package cn.gogpay.dcb.ixc.cloud.auth.dto;

import com.alibaba.fastjson.JSON;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @author: YinHeng
 * @date: 2021/2/7 11:03
 * @description: 认证信息
 */
public class AuthDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 用户id
     */
    private String userId;
    /**
     * 应用权限
     */
    private List<String> apps;

    private EmpInfo EmpInfo;
    /**
     * 数据权限
     */
    private List<Long> dataScopes;
    /**
     * 接口权限Map<Integer,Integer> 转 json字符串
     */
    private Map<Integer, Integer> authorities;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public EmpInfo getEmpInfo() {
        return EmpInfo;
    }

    public void setEmpInfo(EmpInfo empInfo) {
        EmpInfo = empInfo;
    }

    public Map<Integer, Integer> getAuthorities() {
        return authorities;
    }

    public void setAuthorities(Map<Integer, Integer> authorities) {
        this.authorities = authorities;
    }

    public List<String> getApps() {
        return apps;
    }

    public void setApps(List<String> apps) {
        this.apps = apps;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public List<Long> getDataScopes() {
        return dataScopes;
    }

    public void setDataScopes(List<Long> dataScopes) {
        this.dataScopes = dataScopes;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    /**
     * 登录用户员工信息
     */
    public static class EmpInfo {
        /**
         * 工号
         */
        private String jobNum;
        /**
         * 机构id
         */
        private Long orgId;
        /**
         * 机构名称
         */
        private String orgName;

        public String getJobNum() {
            return jobNum;
        }

        public void setJobNum(String jobNum) {
            this.jobNum = jobNum;
        }

        public Long getOrgId() {
            return orgId;
        }

        public void setOrgId(Long orgId) {
            this.orgId = orgId;
        }

        public String getOrgName() {
            return orgName;
        }

        public void setOrgName(String orgName) {
            this.orgName = orgName;
        }
    }

}
